package cn.tp.ksoft.civil_driver.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhusong on 16/5/5.
 */
public class CarType implements Parcelable {

    private int typeId;
    private String typeName;
    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(typeId);
        dest.writeString(typeName);
    }

    public CarType(Parcel source) {
        this.typeId = source.readInt();
        this.typeName = source.readString();
    }

    public CarType(int typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public int getTypeId() {
        return typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public static final Creator<CarType> CREATOR = new Creator<CarType>() {
        @Override
        public CarType createFromParcel(Parcel source) {
            return new CarType(source);
        }

        @Override
        public CarType[] newArray(int size) {
            return new CarType[size];
        }
    };
}
